.include "asm/include/battle_commands.inc"

.data

_000:
    CompareVarToValue OPCODE_EQU, BSCRIPT_VAR_CRIT_MULTIPLIER, 1, _052
    // A critical hit!
    PrintMessage 774, TAG_NONE
    Wait 
    WaitButtonABTime 30
    CheckAbility CHECK_OPCODE_NOT_HAVE, BATTLER_CATEGORY_DEFENDER, ABILITY_ANGER_POINT, _052
    CheckSubstitute BATTLER_CATEGORY_DEFENDER, _052
    CompareMonDataToValue OPCODE_EQU, BATTLER_CATEGORY_DEFENDER, BMON_DATA_HP, 0, _052
    CompareMonDataToValue OPCODE_EQU, BATTLER_CATEGORY_DEFENDER, BMON_DATA_STAT_CHANGE_ATK, 12, _052
    PlayBattleAnimation BATTLER_CATEGORY_DEFENDER, BATTLE_ANIMATION_STAT_BOOST
    Wait 
    UpdateMonData OPCODE_SET, BATTLER_CATEGORY_DEFENDER, BMON_DATA_STAT_CHANGE_ATK, 12
    UpdateVar OPCODE_SET, BSCRIPT_VAR_MESSAGE, 1
    // {0} maxed its {2} with {1}!
    PrintMessage 1093, TAG_NICKNAME_ABILITY_STAT, BATTLER_CATEGORY_DEFENDER, BATTLER_CATEGORY_DEFENDER, BATTLER_CATEGORY_MSG_TEMP
    Wait 
    WaitButtonABTime 30

_052:
    End 
